#ifndef		MDP_SOLVER_H
#define		MDP_SOLVER_H

#include "MatlabDrawer.h"


class MREAgent; 
class TFGenerator; 
class RFGeneralizer; 
#include "types.h"
class MDPSolver: public matlab::MatlabDrawer
{
public: 
	MDPSolver(MREAgent* a, TFGenerator* tf, RFGeneralizer* rf)
		: MatlabDrawer("planner")
	{
		tfGens = tf; 
		rfGens = rf; 
		agent = a; 
	}

	virtual ~MDPSolver(){}

	virtual void operator ()()=0; 
	virtual Action getBestAction(Observation state)=0; 
	virtual void	solveModel(Observation currentState)=0; 
	virtual double getStateValue(const Observation o)=0; 

	virtual void draw(); 
public: 
	MREAgent* agent; 

	TFGenerator* tfGens;		//reward function of the generative model
	RFGeneralizer* rfGens;	//transition function of the generative model 



	//used when multi-threading is enabled
	void stop(){running = false;}
	bool running; 

};




#endif
